/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ProgressBar.java
 *
 * Created on Ok 27, 2012, 9:55:00 PM
 */

package sistemperpustakaan.view;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Toolkit;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JProgressBar;
import javax.swing.plaf.PanelUI;

/**
 *
 * @author EKo
 */
public class LaunchProgressBar extends javax.swing.JDialog{

    /** Creates new form ProgressBar */
    public LaunchProgressBar() {
        setUndecorated(true);
        initComponents();
        setSize(500, 300);
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (dim.width-getWidth())/2;
        int y = (dim.height-getHeight())/2;
        setLocation(x, y);
        
       progressBar.setStringPainted(true);
    }

    public JProgressBar getProgressBar() {
        return progressBar;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        vers = new javax.swing.JLabel();
        SIP = new javax.swing.JLabel();
        gambar = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        jPanel1.setAlignmentX(0.0F);
        jPanel1.setAlignmentY(0.0F);
        jPanel1.setMaximumSize(new java.awt.Dimension(500, 300));
        jPanel1.setPreferredSize(new java.awt.Dimension(500, 300));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        vers.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        vers.setText("version 1.0");
        jPanel1.add(vers, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 210, -1, -1));

        SIP.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        SIP.setText("Sistem Informasi Perpustakaan");
        jPanel1.add(SIP, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 180, -1, -1));

        gambar.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        gambar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sistemperpustakaan/image/book.png"))); // NOI18N
        jPanel1.add(gambar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, -240, 350, 490));

        progressBar.setValue(50);
        jPanel1.add(progressBar, new org.netbeans.lib.awtextra.AbsoluteConstraints(26, 264, 436, -1));

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sistemperpustakaan/image/bg_splash.png"))); // NOI18N
        jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        getContentPane().add(jPanel1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel SIP;
    private javax.swing.JLabel gambar;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    public javax.swing.JProgressBar progressBar;
    private javax.swing.JLabel vers;
    // End of variables declaration//GEN-END:variables

}


